package com.nicole.exception;

import cn.hutool.core.util.StrUtil;
import com.nicole.utils.MessageUtils;
import lombok.Getter;
import lombok.Setter;

/**
 * @Author: nicole
 * @Date: 2025/06/06
 * @Description: 自定义业务异常
 */
@Getter
public class BusinessException extends RuntimeException {
    /**
     * 错误代码
     */
    private Integer code;

    /**
     * 错误信息
     */
    private String errorMsg;

    public BusinessException(Integer code, String errorMsg) {
        this.code = code;
        this.errorMsg = errorMsg;
    }

    public BusinessException(String errorMsg) {
        this.errorMsg = errorMsg;
    }


}
